package wx.display
{
	import flash.display.Bitmap;
	import flash.display.Sprite;
	
	import wx.core.SettingCache;

	public class Image extends Sprite
	{
		
		private var _source:Bitmap;
		
		public function Image(bmp160:Class,bmp240:Class=null,bmp320:Class=null)
		{
			super();			
			if(bmp240!=null && bmp320!=null){
				switch (SettingCache.dpi){
					case 160:
					{
						_source = new bmp160;
						break;
					}
					case 240:
					{
						_source = new bmp240;
						break;
					}
					case 320:
					{
						_source = new bmp320;
						break;
					}
				}
			}else{
				_source = new bmp160;
			}
			addChild(_source);
		}
		
	}
	
	
}